package com.yst.suivi.util;

import java.util.Calendar;

public class DateUtil
{

	/**
	 * Retourne le premier jour de la semaine (Lundi) qui correspond a la date
	 * fournie.
	 * 
	 * @param cal
	 * @return
	 */
	public static Calendar getFirstDayOfWeek(Calendar cal)
	{
		int today = cal.get(Calendar.DAY_OF_WEEK);
		cal.add(Calendar.DAY_OF_MONTH, Calendar.MONDAY - today);
		return cal;
	}
}
